<div class="_contro">
    <select id="store_id" onchange="search();">
        <option value='0'>全部店铺</option>
        <?php foreach($store as $v){?>
        <option value='<?php echo $v['id'];?>' <?php if($store_id==$v['id']){echo "selected='selected'";}?>><?php echo $v['name'];?></option>
        <?php }?>
    </select>&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="/home/barber/create" class="_a"><font class="_font"><b>+</b>添加发型师</font></a>
</div>
<div class='_cut'></div>
<div id='content'>
    <?php foreach($Barbers as $k=>$v){ ?>
    <?php if($k%3==0){?>
    <div class='row'>
        <?php } ?>
        <div class='col-sm-3 col-md-4 full'>
            <div class='thumbnail' style="margin-bottom:10px">
                <div style="height:11.5rem;">
                    <div class='caption '>
                        <div style='float:left;margin-left:-0.5rem;margin-top:-0.7rem;'>
                            <span ><img style='height:11rem;border-radius:50%;overflow:hidden;' src='<?php echo $v['photo'];?>' ></span>
                        </div>
                        <div class='_ling_div' style='color:black;font-size:12px;'>
                            <div style='padding-top:0.4rem'>
                                <span>姓名：<?php echo $v['name'];?></span>
                            </div>
                            <div style='padding-top:0.4rem'>
                                <span>性别：<?php if($v['sex']==0){echo "男";}else{echo "女";};?></span>
                            </div>
                            <div style='padding-top:0.4rem'>
                                <span>手机号：<?php echo $v['mobile'];?></span>
                            </div>
                            <div style='padding-top:0.4rem;'>
                                <span>级别：<?php echo $v['level'];?></span>
                            </div>
                            <div style='padding-top:0.4rem;overflow: hidden;'>
                                <span>店铺：<?php echo $v['store_name'];?></span>
                            </div>
                        </div>
                    </div> 
                </div>            
            </div>
            <input type="hidden" value="<?php echo $v['id'];?>" id="Barbers_id">
            <a href="/home/barber/create?id=<?php echo $v['id']?>">修改</a> 
            <a href="/home/barber/delete?id=<?php echo $v['id']?>" onclick="return confirmAct();">删除</a>
        </div> 
        <?php if(($k+1)%3==0 || $Barbers[$k+1]['id']<1){?>
    </div>
    <?php } ?>
    <?php } ?>
</div>
<script type="text/javascript" language="javascript">
    function search(){
        var store_id = $('#store_id').val();
        window.location.href = '/home/barber?store_id='+store_id;
    }
    function confirmAct()
    {
        if (confirm('确定要执行删除吗?'))
        {
            return true;
        }
        return false;
    }
</script> 